<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">

    <title>第一个JavaScript API应用</title>
    <link rel="stylesheet" href="https://js.arcgis.com/4.15/esri/themes/light/main.css">
    <style>
        html,
        body,
        #mapDiv {
            padding: 0;
            margin: 0;
            height: 100%;
        }
    </style>
    <script>
        src = "http://js.arcgis.com/4.15/" >
    </script>


    <script>
        Request(["esri/map", "esri/layers/ArcGISTileMapServiceLayer", "dojo/domReady!"], function(map, ArcGISTileMapServiceLayer) {
            //以下是创建地图与加入底图代码
            var map = new map("mapDiv");
            var agoServiceURL = "http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer";
            var agoLayer = new ArcGISTileMapServiceLayer(agoServiceURL, {
                displayLevels: [0, 1, 2, 3, 4, 5, 6, 7]
            });
            map.addLayer(agoLayer);
        });
    </script>
</head>

<body>
    <div id="mapDi"></div>

</body>

</html>

<!--
    http://archive.dojotoolkit.org/night1y/dojotoolkit/dijit/themes/themeTester.html

    https://archive.dojotoolkit.org/nightly/

-->